<template>
  <div class="container">
    <van-nav-bar title="货物清单" fixed @click-left="onClickLeft">
      <van-icon name="arrow-left" slot="left" color="#333" size="0.6rem" />
    </van-nav-bar>
    <div class="fixed_box" v-if="flag">
      <van-cell-group>
        <van-field v-model="orderName" required label="货物信息" placeholder="请输入" input-align="right" />
        <van-field
          v-model="number"
          required
          label="件数(件)"
          type="number"
          placeholder="请输入"
          input-align="right"
        />
        <van-field
          v-model="weight"
          required
          label="总重量(公斤)"
          type="number"
          placeholder="请输入"
          input-align="right"
        />
        <van-field
          v-model="volume"
          label="总体积(方)"
          type="number"
          placeholder="请输入"
          input-align="right"
        />
      </van-cell-group>
      <div class="check">
        <p>货物情况</p>
        <ul>
          <li
            :class="checkArr.filter(item => item == '散货').length ? 'active' : ''"
            @click="onclick('散货')"
          >散货</li>
          <li
            :class="checkArr.filter(item => item == '成托').length? 'active' : ''"
            @click="onclick('成托')"
          >成托</li>
          <li
            :class="checkArr.filter(item => item == '不可压').length ? 'active' : ''"
            @click="onclick('不可压')"
          >不可压</li>
          <li
            :class="checkArr.filter(item => item == '易碎性').length ? 'active' : ''"
            @click="onclick('易碎性')"
          >易碎性</li>
        </ul>
      </div>
      <van-cell-group>
        <van-field
          v-model="message"
          label="备注"
          type="textarea"
          placeholder="其他情况备注..."
          autosize
          :border="false"
          input-align="right"
        />
<!-- 
        <van-cell title="上传照片" class="price">
          <div style="padding:10px 0;">
            <van-uploader
              v-model="fileList"
              :before-read="asyncBeforeRead"
              :before-delete="beforeDelete"
              :max-count="1"
              multiple
              preview-size="1.6rem"
            />
          </div>
        </van-cell> -->
      </van-cell-group>
      <div class="buton">
        <van-button class="butonO" type="primary" @click="onColcal">取消</van-button>
        <van-button class="butonT" type="primary" @click="preservation">保存</van-button>
      </div>
    </div>
    <div v-if="orderArr.length>=2">
      <div
        class="goods-item"
        v-for="(item,index) in orderArr"
        :key="index"
        @click="Clickgoods(index)"
      >
      <div v-if="item.KaGoodPicture">
        <img :src="item.KaGoodPicture ? `https://${item.KaGoodPicture}` : ''" alt class="goods-img" />
      </div>
      <div v-else>
        <div class="goods-img"></div>
      </div>
        <div class="goods-info">
          <div class="good-title">
            <span>{{item.KaGoodName}}</span>
            <van-icon
              @click.stop="handelDelete(index)"
              :name="require('@/assets/img/delete.png')"
              color="#333"
              size="0.6rem"
            />
          </div>
          <div class="good-desc">总重量：{{(item.KaWeightKg)}}kg 总体积：{{item.KaVolume}}m³</div>
          <div class="good-num" @click.stop>
            <span v-for="(items, ind) in item.checkArr" :key="ind">{{items}}</span>
            <van-stepper
              @change="changeQuantity(index)"
              v-model="item.KaQuantity"
              integer
              min="1"
              max="999999"
            />
          </div>
        </div>
      </div>
    </div>

    <div v-else>
      <van-cell-group>
        <van-field v-model="orderName" required label="货物信息" placeholder="请输入" input-align="right" />
        <van-field
          v-model="number"
          required
          type="number"
          label="件数(件)"
          placeholder="请输入"
          input-align="right"
        />
        <van-field
          v-model="weight"
          required
          type="number"
          label="总重量(公斤)"
          placeholder="请输入"
          input-align="right"
        />
        <van-field
          v-model="volume"
          label="总体积(方)"
          type="number"
          placeholder="请输入"
          input-align="right"
        />
      </van-cell-group>
      <div class="check">
        <p>货物情况</p>
        <ul>
          <li
            :class="checkArr.filter(item => item == '散货').length ? 'active' : ''"
            @click="onclick('散货')"
          >散货</li>
          <li
            :class="checkArr.filter(item => item == '成托').length? 'active' : ''"
            @click="onclick('成托')"
          >成托</li>
          <li
            :class="checkArr.filter(item => item == '不可压').length ? 'active' : ''"
            @click="onclick('不可压')"
          >不可压</li>
          <li
            :class="checkArr.filter(item => item == '易碎性').length ? 'active' : ''"
            @click="onclick('易碎性')"
          >易碎性</li>
        </ul>
      </div>
      <van-cell-group>
        <van-field
          v-model="message"
          label="备注"
          type="textarea"
          placeholder="其他情况备注..."
          autosize
          :border="false"
          input-align="right"
        />

        <!-- <van-cell title="上传照片" class="price">
          <div style="padding:10px 0;">
            <van-uploader
              v-model="fileList"
              :before-read="asyncBeforeRead"
              :before-delete="beforeDelete"
              :max-count="1"
              multiple
              preview-size="1.6rem"
              required
            />
          </div>
        </van-cell> -->
      </van-cell-group>
    </div>

    <div class="add" @click="addClick">继续添加</div>
    <van-action-sheet v-model="showType" title="货物信息">
      <div class="content">
        <van-field
          v-model="orderNameT"
          class="fieldTit"
          label="货物信息"
          placeholder="请输入"
          input-align="right"
          :border="false"
        />
        <dl>
          <dt>总件数</dt>
          <dd>
            <van-stepper v-model="orderNumT" integer />
          </dd>
        </dl>
        <dl>
          <dt>总重量(公斤)</dt>
          <dd>
            <van-stepper v-model="weightT" integer />
          </dd>
        </dl>
        <dl>
          <dt>总体积(方)</dt>
          <dd>
            <van-stepper v-model="volumeT" />
          </dd>
        </dl>
        <div class="checkSteper">
          <p class="tit">货物情况</p>
          <ul>
            <li
              :class="checkArrT.filter(item => item == '散货').length ? 'active' : ''"
              @click="onclickT('散货')"
            >散货</li>
            <li
              :class="checkArrT.filter(item => item == '成托').length? 'active' : ''"
              @click="onclickT('成托')"
            >成托</li>
            <li
              :class="checkArrT.filter(item => item == '不可压').length ? 'active' : ''"
              @click="onclickT('不可压')"
            >不可压</li>
            <li
              :class="checkArrT.filter(item => item == '易碎性').length ? 'active' : ''"
              @click="onclickT('易碎性')"
            >易碎性</li>
          </ul>
        </div>
        <van-field
          class="field"
          v-model="messageT"
          label="备注"
          type="textarea"
          placeholder="其他情况备注..."
          autosize
          :border="false"
          input-align="right"
        />
        <!-- <van-cell title="上传照片" class="price">
          <div style="padding:10px 0;">
            <van-uploader
              v-model="fileListT"
              :before-read="asyncBeforeReadT"
              :before-delete="beforeDeleteT"
              :max-count="1"
              multiple
              preview-size="1.6rem"
            />
          </div>
        </van-cell> -->
        <div class="buton">
          <van-button class="butonO" type="primary" @click="onCol">取消</van-button>
          <van-button class="butonT" type="primary" @click="onSubmit">确定</van-button>
        </div>
      </div>
    </van-action-sheet>
    <div class="buton">
      <van-button class="butonO" type="primary" @click="oncolcal">取消</van-button>
      <van-button class="butonT" type="primary" @click="onOK">确定</van-button>
    </div>
  </div>
</template>

<script>
import Vue from "vue";
import { Uploader, Toast } from "vant";
import { compressor } from "@/utils/utils";
Vue.use(Uploader, Toast);
export default {
  data() {
    return {
      checkArr: [],
      fileList: [],
      fileListT: [],
      actionsType: [],
      orderArr: [],
      checkArrT: [],
      uploadImg: [], // 已上传图片数组
      uploadImgT: [], // 已上传图片数组
      message: "",
      showType: false,
      orderNum: "",
      weight: "",
      volume: "",
      orderNumT: 1,
      orderName: "",
      orderNameT: "",
      weightT: 1,
      volumeT: 1,
      number: "",
      messageT: "",
      orderData: [],
      query: {},
      flag: false,
      ind: null,
      StopArr: {}
    };
  },
  created() {
    this.query = this.$router.history.current.query;
      this.StopArr = JSON.parse(window.sessionStorage.getItem("stopOverList"))
      this.orderArr = JSON.parse(window.sessionStorage.getItem("stopOverList"))[this.query.ind].kaGoodsTypeList;
      if (this.orderArr.length == 1) {
        this.orderName = this.orderArr[0].KaGoodName;
        this.weight = this.orderArr[0].KaWeightKg;
        this.volume = this.orderArr[0].KaVolume;
        this.number = this.orderArr[0].KaQuantity;
        // this.checkArr = this.orderArr[0].checkArr;
        this.messageT = this.orderArr[0].kaRemarks;
        if (this.orderArr[0].KaGoodPicture) {
          this.fileList[0] = {
            url: `https://${this.orderArr[0].KaGoodPicture}`
          };
        }
      }
  },
  methods: {
    addClick() {
      console.log(this.orderArr)
      if (this.orderArr.length) {
        this.showType = !this.showType;
      } else if (this.orderName && this.weight && this.number) {
        console.log(this.orderName && this.weight && this.number)
        let goodSituation;
        if (
          this.checkArr.filter(item => item == "散货").length &&
          this.checkArr.filter(item => item == "成托").length
        ) {
          goodSituation = 3;
        } else if (this.checkArr.filter(item => item == "散货").length) {
          goodSituation = 1;
        } else if (this.checkArr.filter(item => item == "成托").length) {
          goodSituation = 2;
        } else {
          goodSituation = 4;
        }
        let fragile;
        if (this.checkArrT.filter(item => item == "易碎性").length) {
          fragile = 2;
        } else {
          fragile = 1;
        }
        let pressurable;
        if (this.checkArrT.filter(item => item == "不可压").length) {
          pressurable = 1;
        } else {
          pressurable = 2;
        }

        let list = {
          KaGoodName: this.orderName,
          KaWeightKg: this.weight,
          KaVolume: this.volume,
          KaQuantity: this.number,
          checkArr: this.checkArr,
          goodSituation: goodSituation,
          kaRemarks: this.messageT,
          Fragile: fragile,
          Pressurable: pressurable,
          KaGoodPicture: this.uploadImg[0]
        };
        this.orderArr[0] = list;
        this.showType = !this.showType;
      } else {
        Toast("请将货物信息补充完整！");
      }
    },
    preservation() {
      if (this.orderName && this.weight && this.number) {
        this.flag = false;
        this.orderArr[this.ind].KaGoodName = this.orderName;
        this.orderArr[this.ind].KaQuantity = this.number;
        this.orderArr[this.ind].KaWeightKg = this.weight;
        this.orderArr[this.ind].KaVolume = this.volume;
        this.orderArr[this.ind].KaGoodPicture =
          this.fileList[0] && this.fileList[0].url
            ? this.fileList[0].url.split("https://")[1]
            : this.uploadImg[0];
        this.orderArr[this.ind].checkArr = this.checkArr;
      } else {
        Toast("请将信息补充完整！");
      }
    },
    onColcal() {
      this.flag = false;
    },
    changeQuantity(index) {
      console.log(index);
      // this.orderArr[index].KaQuantity =
      let kaGoodsTypeList = [];

      // kaGoodsTypeList = this.orderData.kaGoodsTypeList;
      // if (kaGoodsTypeList[index].KaQuantity <= 999999) {
      //   kaGoodsTypeList[index].KaVolume = parseFloat(
      //     kaGoodsTypeList[index].KaQuantity * kaGoodsTypeList[index].unitVolumn
      //   ).toFixed(2);
      //   kaGoodsTypeList[index].KaWeightKg =
      //     kaGoodsTypeList[index].KaQuantity * kaGoodsTypeList[index].unitWeight;
      //   kaGoodsTypeList[index].lastInputQuantity =
      //     kaGoodsTypeList[index].KaQuantity;
      // } else {
      //   kaGoodsTypeList[index].KaQuantity = kaGoodsTypeList[index]
      //     .lastInputQuantity
      //     ? kaGoodsTypeList[index].lastInputQuantity
      //     : 999999;
      // }
    },
    onClickLeft() {
      this.$router.back();
    },
    asyncBeforeRead(file, detail) {
      return new Promise((resolve, reject) => {
        console.log(file);
        compressor(file)
          .then(res => {
            // this.parm.imageAddress = "https://"+res
            console.log(detail);
            this.uploadImg.push(`${res}`);
            resolve();
          })
          .catch(error => {
            // 上传失败
            reject();
            this.$toast.fail(error);
          });
      });
    },
    asyncBeforeReadT(file, detail) {
      return new Promise((resolve, reject) => {
        console.log(file);
        compressor(file)
          .then(res => {
            // this.parm.imageAddress = "https://"+res
            console.log(detail);
            this.uploadImgT.push(`${res}`);
            resolve();
          })
          .catch(error => {
            // 上传失败
            reject();
            this.$toast.fail(error);
          });
      });
    },
    Clickgoods(ind) {
      this.flag = true;
      this.orderName = this.orderArr[ind].KaGoodName;
      this.number = this.orderArr[ind].KaQuantity;
      this.weight = this.orderArr[ind].KaWeightKg;
      this.volume = this.orderArr[ind].KaVolume;
      if (this.orderArr[ind].KaGoodPicture) {
        this.fileList[0] = {
          url: `https://${this.orderArr[ind].KaGoodPicture}`
        };
      } else {
        this.fileList = []
      }
      this.checkArr = this.orderArr[ind].checkArr;
      this.ind = ind;
    },
    onclick(val) {
      let Arr = this.checkArr.filter(item => item == val);
      if (!Arr.length) {
        this.checkArr.push(val);
      } else {
        this.checkArr.forEach((item, i) => {
          if (item == val) {
            this.checkArr.splice(i, 1);
          }
        });
      }
      console.log(this.checkArr);
    },
    onclickT(val) {
      let Arr = this.checkArrT.filter(item => item == val);
      if (!Arr.length) {
        this.checkArrT.push(val);
      } else {
        this.checkArrT.forEach((item, i) => {
          if (item == val) {
            this.checkArrT.splice(i, 1);
          }
        });
      }
      console.log(this.checkArrT);
    },
    onSubmit() {
      if (this.orderNameT && this.weightT && this.orderNumT) {
        let goodSituation;
        if (
          this.checkArrT.filter(item => item == "散货").length &&
          this.checkArrT.filter(item => item == "成托").length
        ) {
          goodSituation = 3;
        } else if (this.checkArrT.filter(item => item == "散货").length) {
          goodSituation = 1;
        } else if (this.checkArrT.filter(item => item == "成托").length) {
          goodSituation = 2;
        } else {
          goodSituation = '';
        }
        let fragile;
        if (this.checkArrT.filter(item => item == "易碎性").length) {
          fragile = 2;
        } else {
          fragile = 1;
        }
        let pressurable;
        if (this.checkArrT.filter(item => item == "不可压").length) {
          pressurable = 1;
        } else {
          pressurable = 2;
        }

        let list = {
          KaGoodName: this.orderNameT,
          KaWeightKg: this.weightT,
          KaVolume: this.volumeT,
          KaQuantity: this.orderNumT,
          goodSituation: goodSituation,
          checkArr: this.checkArrT,
          kaRemarks: this.messageT,
          Fragile: fragile,
          Pressurable: pressurable,
          KaGoodPicture: this.uploadImgT[0]
        };
        this.orderArr.push(list);
        this.orderNameT = "";
        this.weightT = 1;
        this.volumeT = 1;
        this.orderNumT = 1;
        this.checkArrT = [];
        this.uploadImgT = [];
        this.fileListT = [];
        this.showType = false;
      } else {
        Toast("请将货物信息补充完整！");
      }
      console.log(this.orderArr);
    },
    handelDelete(ind) {
      this.orderArr.splice(ind, 1);
      if (this.orderArr.length == 1) {
        this.orderName = this.orderArr[0].KaGoodName;
        this.weight = this.orderArr[0].KaWeightKg;
        this.volume = this.orderArr[0].KaVolume;
        this.number = this.orderArr[0].KaQuantity;
        this.checkArr = this.orderArr[0].checkArr;
        this.messageT = this.orderArr[0].kaRemarks;
        this.fileList[0] = { url: `https://${this.orderArr[0].KaGoodPicture}` };
      }
      if (!this.orderArr.length) {
        this.orderName = "";
        this.weight = 1;
        this.volume = 1;
        this.number = 1;
        this.checkArr = [];
        this.uploadImg = [];
        this.fileList = [];
      }
    },
    beforeDelete(file, detail) {
      this.uploadImg.splice(detail.index, 1);
      return true;
    },
    beforeDeleteT(file, detail) {
      this.uploadImgT.splice(detail.index, 1);
      return true;
    },
    onCol() {
      this.showType = false;
    },
    oncolcal(){
      this.$router.back();
    },
    onOK() {
        let dataSum = 0; //总计
        let kaQuantity = 0; //件数
        let kaVolume = 0; // 体积
        let kaWeightKg = 0; // 重量
      if (this.orderArr.length > 1) {
          this.StopArr[this.$router.history.current.query.ind].kaGoodsTypeList = this.orderArr
          this.orderArr.map(item => {
              kaQuantity += (item.KaQuantity) * 1;
              kaVolume += (item.KaVolume) * 1;
              kaWeightKg += (item.KaWeightKg) * 1;
          })
          this.StopArr[this.$router.history.current.query.ind].kaGoodTypeSumInfo = {
              kaQuantity: kaQuantity,
              kaVolume: kaVolume,
              kaWeightKg: kaWeightKg
          }
        window.sessionStorage.setItem(
          "stopOverList",
          JSON.stringify(this.StopArr)
        );
        this.$router.back();
        // if(this.$router.history.current.query.state == 1) {
        //       this.$router.push({
        //     path: "/details",
        //     query: {orderId: this.$router.history.current.query.orderId}
        //   });
        //   } else {
        //     this.$router.push({
        //     path: "/addList",
        //     query: this.$router.history.current.query
        //   });
        //   }
        } else {
        if (this.orderName && this.weight && this.number) {
          let goodSituation;
          if (
            this.checkArr.filter(item => item == "散货").length &&
            this.checkArr.filter(item => item == "成托").length
          ) {
            goodSituation = 3;
          } else if (this.checkArr.filter(item => item == "散货").length) {
            goodSituation = 1;
          } else if (this.checkArr.filter(item => item == "成托").length) {
            goodSituation = 2;
          } else {
            goodSituation = 4;
          }
          let fragile;
          if (this.checkArrT.filter(item => item == "易碎性").length) {
            fragile = 2;
          } else {
            fragile = 1;
          }
          let pressurable;
          if (this.checkArrT.filter(item => item == "不可压").length) {
            pressurable = 1;
          } else {
            pressurable = 2;
          }
          let list = {
            KaGoodName: this.orderName,
            KaWeightKg: this.weight,
            KaVolume: this.volume,
            KaQuantity: this.number,
            checkArr: this.checkArr,
            goodSituation: goodSituation,
            kaRemarks: this.messageT,
            Fragile: fragile,
            Pressurable: pressurable,
            KaGoodPicture: this.uploadImg[0]
          };
          this.orderArr[0] = list;
          this.StopArr[this.$router.history.current.query.ind].kaGoodsTypeList = []
          this.StopArr[this.$router.history.current.query.ind].kaGoodsTypeList[0] = this.orderArr[0]
          this.StopArr[this.$router.history.current.query.ind].kaGoodsTypeList = this.orderArr
          this.orderArr.map(item => {
              kaQuantity += (item.KaQuantity) * 1;
              kaVolume += (item.KaVolume) * 1;
              kaWeightKg += (item.KaWeightKg) * 1;
          })
          this.StopArr[this.$router.history.current.query.ind].kaGoodTypeSumInfo = {
              kaQuantity: kaQuantity,
              kaVolume: kaVolume,
              kaWeightKg: kaWeightKg
          }
          window.sessionStorage.setItem(
            "stopOverList",
            JSON.stringify(this.StopArr)
          );
          this.$router.back();
        //   if(this.$router.history.current.query.state == 1) {
        //       this.$router.push({
        //     path: "/details",
        //     query: {orderId: this.$router.history.current.query.orderId}
        //   });
        //   } else {
        //     this.$router.push({
        //     path: "/addList",
        //     query: this.$router.history.current.query
        //   });
        //   }
        } else {
          Toast("请将货物信息补充完整！");
        }
      }
    },
    onClose() {},
    onSelect() {}
  }
};
</script>

<style lang="scss" scoped>
.container {
  padding: 44px 0 0 0;
  box-sizing: border-box;
  background: #fff;
  height: 100%;
  /deep/.van-nav-bar {
    z-index: 20;
  }
  .fixed_box {
    background: #fff;
    width: 100%;
    height: 100%;
    position: fixed;
    top: 46px;
    left: 0;
    z-index: 19;
  }
}
/deep/.van-cell__title {
  width: auto;
}
.check {
  font-size: 13px;
  background: #fff;
  padding: 15px;
  box-sizing: border-box;
  // p::before{
  //   position: absolute;
  //   left: 0.21333rem;
  //   color: #ee0a24;
  //   font-size: 0.37333rem;
  //   content: '*';
  // }
  ul {
    display: flex;
    li {
      border: 1px solid #f3f3f3;
      color: #666666;
      width: 100px;
      height: 30px;
      text-align: center;
      line-height: 30px;
      margin: 10px 10px 0 0;
      background: #f3f3f3;
      border-radius: 4px;
    }
    .active {
      border: 0.5px solid #f18d00;
      color: #f18d00;
      background: #fffaf2;
    }
  }
}
.buton {
  padding: 8px 16px;
  box-sizing: border-box;
  display: flex;
  border-radius: 5px;
  justify-content: space-around;
  background: #fff;
  width: 100%;
  position: fixed;
  bottom: 0;
  left: 0;
  .butonO {
    background: #fff;
    width: 328px;
    height: 44px;
    border: 1px solid #f18d00;
    border-radius: 5px;
    color: #f18d00;
  }
  .butonT {
    background: #f18d00;
    width: 328px;
    height: 44px;
    margin-left: 10px;
    border: 1px solid #f18d00;
  }
}
.btn {
  padding: 8px 16px;
  box-sizing: border-box;
  display: flex;
  border-radius: 5px;
  justify-content: space-around;
  background: #fff;
  width: 100%;
  .btnO {
    background: #fff;
    width: 328px;
    height: 44px;
    border: 1px solid #f18d00;
    border-radius: 5px;
    color: #f18d00;
  }
  .btnT {
    background: #f18d00;
    width: 328px;
    height: 44px;
    margin-left: 10px;
    border: 1px solid #f18d00;
  }
}
.add {
  font-size: 14px;
  font-weight: bold;
  text-align: center;
  color: #f18d00;
  margin-top: 10px;
}
.content {
  padding: 16px 16px 60px;
}
.content dl {
  display: flex;
  font-size: 13px;
  justify-content: space-between;
  margin-bottom: 20px;
  dt::before {
    position: absolute;
    left: 0.21333rem;
    color: #ee0a24;
    font-size: 0.37333rem;
    content: "*";
  }
}
.checkSteper {
  font-size: 15px;
  background: #fff;
  box-sizing: border-box;
  display: flex;
  justify-content: space-between;
  justify-items: center;
  align-items: center;

  .tit {
    font-size: 13px;
    // &::before {
    //   position: absolute;
    //   left: 0.21333rem;
    //   color: #ee0a24;
    //   font-size: 0.37333rem;
    //   content: "*";
    // }
  }
  ul {
    display: flex;
    justify-content: space-around;
    li {
      border: 1px solid #f3f3f3;
      color: #666666;
      width: 60px;
      height: 30px;
      text-align: center;
      line-height: 30px;
      margin: 10px 5px 0 0;
      background: #f3f3f3;
      border-radius: 4px;
    }
    .active {
      border: 0.5px solid #f18d00;
      color: #f18d00;
      background: #fffaf2;
    }
  }
}
.field {
  padding: 20px 0 0 0;
}
.fieldTit {
  padding: 20px 0;
}
.goods-item {
  background: #ffffff;
  box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
  border-radius: 4px;
  padding: 10px;
  display: flex;
  .goods-img {
    flex: 0 0 84px;
    width: 84px;
    height: 84px;
    background: #ccc;
    margin-right: 10px;
    border-radius: 4px;
  }
  .goods-info {
    flex: 1 0 auto;
    display: flex;
    flex-flow: column;
    height: 84px;
    justify-content: space-around;
    overflow: visible;
    .good-title {
      font-size: 16px;
      display: flex;
      justify-content: space-between;
    }
    .good-desc {
      color: #999;
      font-size: 12px;
      overflow: hidden;
      overflow: hidden;
    }
    .good-num {
      font-size: 15px;
      display: flex;
      justify-content: space-between;
    }
  }
}
// .price .van-cell__title{
//   span::before{
//     position: absolute;
//     left: 0.21333rem;
//     color: #ee0a24;
//     font-size: 0.37333rem;
//     content: '*';
//   }
// }
</style>